// component/product_list_a/product_list_a.js

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    product: {
      type: Object,
      value: {},
      observer: function(newVal, oldVal, changedPath) {
        //console.log(newVal)

        let model = newVal;

        this.setData({
          model
        })

      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
      goDetail(e) {
          const myEventDetail = {"id":e.currentTarget.dataset.id} // detail对象，提供给事件监听函数

          this.triggerEvent("goDetail", myEventDetail)
          //第一个参数，就是给这个事件起个名字，要在组件的bind后面用，第二个参数是传入数据，还有第三个参数冒泡啥的
      }
  }
})

/**
 * product: {
      "label_name":"艺术画作",
      "list":[
        {"img":"/images/product_list_b_img.png","title":" 以文学与时代的名义发声——与15部诺奖作品美妙相遇","desc":"一篇文章的描述","price":"119","hx_price":"999"},
        {"img":"/images/product_list_b_img.png","title":" 以文学与时代的名义发声——与15部诺奖作品美妙相遇","desc":"一篇文章的描述","price":"119","hx_price":"999"},
        {"img":"/images/product_list_b_img.png","title":" 以文学与时代的名义发声——与15部诺奖作品美妙相遇","desc":"一篇文章的描述","price":"119","hx_price":"999"},
        {"img":"/images/product_list_b_img.png","title":" 以文学与时代的名义发声——与15部诺奖作品美妙相遇","desc":"一篇文章的描述","price":"119","hx_price":"999"},
        {"img":"/images/product_list_b_img.png","title":" 以文学与时代的名义发声——与15部诺奖作品美妙相遇","desc":"一篇文章的描述","price":"119","hx_price":"999"}
      ]
    }
 *
 *
 */